package com.xnyzc.lhy.mis.controller.cmsapi.area;

import com.xnyzc.lhy.common.entity.Rv;
import com.xnyzc.lhy.mis.service.cms.area.AreaTreeService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 获取区域的树
 *
 * @Author: wangshuo
 * @Date: 2019-08-22 14:11
 */
@RestController
@RequestMapping("/cmsapi/areatree")
public class AreaTreeController {

    @Autowired
    private AreaTreeService areaTreeService;

    /**
     * 获取区域的树
     * @return
     */
    @ApiOperation(value = "获取区域的树", notes = "获取区域的树")
    @GetMapping(value = "/getAreaJson")
    public Rv getAreaJson(
    ) {
        return Rv.wrap(areaTreeService.getAreaJson());
    }

}
